how to save a c# dictionary

55

how to save a c# dictionary -

File.WriteAllText("SomeFile.Txt", new JavaScriptSerializer().Serialize(dictionary));

how to save a c# dictionary -

var dictionary = new JavaScriptSerializer()
    .Deserialize<Dictionary<string, string>>(File.ReadAllText("SomeFile.txt"));

Comments

Submit
0 Comments